#define _CRT_SECURE_NO_WARNINGS 1
int minNumberInRotateArray(int* rotateArray, int rotateArrayLen) {
    int left = 0;
    int right = rotateArrayLen - 1;
    int min = 10001;
    while (left <= right) {
        int mid = left + (right - left) / 2;
        min = min < rotateArray[mid] ? min : rotateArray[mid];
        if (rotateArray[mid] < rotateArray[right])
            right = mid - 1;
        else if (rotateArray[mid] > rotateArray[right])
            left = mid + 1;
        else
            right--;
    }
    return min;
}